@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    --primary-color: #2D6A4F;
    --primary-dark: #1B4332;
    --primary-light: #52B788;
    --text-main: #1A1A1A;
    --bg-main: #F8F9FA;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Navbar */
header {
    background: transparent;
    padding: 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.2rem 5%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.brand a {
    text-decoration: none;
    color: var(--primary-dark) !important;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    padding-left: 10px;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
}

.brand a i {
    color: var(--primary-color);
}

.brand a:hover {
    color: var(--primary-color) !important;
    transform: scale(1.02);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    gap: 1.5rem;
}

.nav-links li {
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    padding: 8px 0;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-links a:hover,
.nav-links a.active-nav {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active-nav::after {
    width: 100%;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    /* Ensure it stays above the side menu */
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-dark);
    margin: 5px;
    transition: all 0.3s ease;
}

/* Toggle Animation */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Main Section */
main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 100px 20px 60px;
    background: linear-gradient(rgba(27, 67, 50, 0.7), rgba(27, 67, 50, 0.8)), url('https://d2eehagpk5cl65.cloudfront.net/img/q60/uploads/2022/04/zumaamericastwentyfive958310-scaled.jpg') center/cover no-repeat fixed;
}

/* Beautiful combined Auth Card */
.auth-container {
    width: 440px;
    height: 520px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3), inset 0 0 10px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    padding: 40px 30px;
    transition: height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: scaleIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleIn {
    0% {
        transform: translateY(30px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Toggle Buttons */
.auth-toggle-box {
    width: 100%;
    max-width: 320px;
    margin: 5px auto 40px;
    position: relative;
    box-shadow: 0 0 20px 5px rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
}

.toggle-btn {
    padding: 14px 0;
    cursor: pointer;
    background: transparent;
    border: 0;
    outline: none;
    position: relative;
    text-align: center;
    width: 50%;
    color: #fff;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    z-index: 2;
    transition: color 0.3s;
}

#btn-bg {
    top: 0;
    left: 0;
    position: absolute;
    width: 50%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 30px;
    transition: left 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.4);
}

/* Authenticated Forms inside Container */
.auth-form-group {
    top: 130px;
    position: absolute;
    width: 380px;
    left: 30px;
    /* Centered relative to 440 container (440-380)/2 = 30 */
    transition: left 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group .icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 2;
    transition: var(--transition);
}

.input-field {
    width: 100%;
    padding: 12px 15px 12px 45px;
    /* Offset for icon */
    background: rgba(255, 255, 255, 0.85);
    border: 2px solid transparent;
    outline: none;
    color: var(--text-main);
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    position: relative;
    transition: var(--transition);
}

.input-field:focus {
    background: #fff;
    border: 2px solid var(--primary-light);
    box-shadow: 0 0 10px rgba(82, 183, 136, 0.3);
}

.input-field:focus+.icon,
.input-group:focus-within .icon {
    color: var(--primary-color);
}

/* Select specific styling */
select.input-field {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

select.input-field:invalid {
    color: var(--text-muted);
}

select.input-field option {
    color: var(--text-main);
    background: var(--bg-white);
}

/* Error Text */
.error-text {
    color: #ff4d4f;
    font-size: 0.85rem;
    margin-top: -10px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 500;
    min-height: 18px;
    /* Maintain height when empty */
}

/* Checkbox & Forgot Password*/
.terms {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.terms input {
    margin-right: 10px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.terms label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    cursor: pointer;
}

.register-forget {
    text-align: center;
    margin-top: -5px;
    margin-bottom: 25px;
}

.register-forget a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.register-forget a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Submit Buttons */
.submit-btn {
    width: 100%;
    padding: 14px 30px;
    cursor: pointer;
    display: block;
    margin: auto;
    background: var(--primary-dark);
    border: 0;
    outline: none;
    border-radius: 30px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(27, 67, 50, 0.4);
}

.submit-btn:hover {
    transform: translateY(-2px);
    background: var(--primary-color);
    box-shadow: 0 6px 20px rgba(45, 106, 79, 0.5);
    animation: pulseAuth 1.5s infinite;
}

@keyframes pulseAuth {
    0% {
        box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.4);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(45, 106, 79, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(45, 106, 79, 0);
    }
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 15px 20px;
    font-size: 0.95rem;
}

/* Initial Layout Positions for forms */
#login {
    left: 30px;
}

#signup {
    left: 500px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 5%;
        justify-content: space-between;
    }

    .nav-links {
        position: fixed;
        right: 0px;
        height: 100vh;
        top: 0;
        background-color: rgba(255, 255, 255, 0.98);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 300px;
        transform: translateX(100%);
        transition: transform 0.5s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        gap: 2rem;
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .hamburger {
        display: block;
        position: absolute;
        right: 5%;
        top: 1.5rem;
    }

    .nav-links li {
        margin: 5px 10px;
        opacity: 0;
    }

    @keyframes navLinkFade {
        from {
            opacity: 0;
            transform: translateX(50px);
        }

        to {
            opacity: 1;
            transform: translateX(0px);
        }
    }

    .auth-container {
        width: 100%;
        max-width: 420px;
        padding: 40px 20px;
    }

    .auth-form-group {
        width: 100%;
        max-width: 360px;
        left: 20px;
    }

    #signup {
        left: 500px;
    }
}